Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

323
Vistas
How to add "1+More" tag button in jquery autocomplete?

I have added jquery autocomplete in my website search box for the locations. I am able to achieve multiple autocomplete search suggestions in the box but it looks not user friendly as all the suggestions are displayed with the box. I want 1 or 2 suggestions and rest all will be under the tag button called: "1+ More". I have attached the desired output and what I have right now.

Javascript code used:

<script type="text/javascript">
    $(function(){
        $.getJSON("<?php echo base_url();?>package.json", function(data) {
        
        autoComplete = [];
        for (var i = 0, len = data.length; i < len; i++) {
            autoComplete.push(data[i]);
        }
        $('#myAutocompleteMultiple').autocomplete({
            source: autoComplete,
            multiselect: true,
            
        });
    });
</script>

and html used:

<input id="myAutocompleteMultiple" type="text" placeholder="Search Location"/>

Json file content:

[
    "Al Barari Commercial",
    "Al Quoz Commercial",
    "Al Qusais Commercial",
    "Arjan Commercial",
    "Bur Dubai Commercial"
]

Please anyone help me.

desired output

current output

Thank you.

about 4 years ago · Santiago Gelvez
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda